import axiosInstance from "../axiosInstance";

const orderInfo = {
  /**
   * 根据分页获取订单信息
   * @param {*} pageIndex  订单页码
   * @param {*} start_time  订单开始时间
   * @param {*} end_time 订单结束时间
   * @param {*} order_status 订单状态
   * @param {*} uid 用户id
   * @returns  {Promise<AxiosResponse>}
   */
  getListByPage({ pageIndex, start_time, end_time, order_status, uid }) {
    return axiosInstance.get("/orderInfo/getListByPage", {
      params: {
        pageIndex,
        start_time,
        end_time,
        order_status,
        uid,
      },
    });
  },
   /**
   * 根据id发货
   * @param {*} id 用户发货
   * @returns {Promise<AxiosResponse>}
   */
    updateOrderToDeliver({ id }) {
      return axiosInstance.get("/orderInfo/updateOrderToDeliver", {
        params: {
          id,
        },
      });
    },
};

export default orderInfo;
